cURL
curl --request POST \
--url https://app.masivo.ai/api/storefront/v1/communication/threads/{id}/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-account-id: <x-account-id>' \
--data '
{
"parent_message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_message_id": "<string>",
"sender_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sender_customer_id": "<string>",
"sender_email": "jsmith@example.com",
"sender_display_name": "<string>",
"recipient_actor_ids": [
{}
],
"subject": "<string>",
"body_text": "<string>",
"body_html": "<string>",
"attachments": [
{}
],
"raw_payload": {},
"sent_at": "2023-11-07T05:31:56Z",
"delivered_at": "2023-11-07T05:31:56Z",
"read_at": "2023-11-07T05:31:56Z",
"failed_at": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://app.masivo.ai/api/storefront/v1/communication/threads/{id}/messages"
payload = {
"parent_message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_message_id": "<string>",
"sender_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sender_customer_id": "<string>",
"sender_email": "jsmith@example.com",
"sender_display_name": "<string>",
"recipient_actor_ids": [{}],
"subject": "<string>",
"body_text": "<string>",
"body_html": "<string>",
"attachments": [{}],
"raw_payload": {},
"sent_at": "2023-11-07T05:31:56Z",
"delivered_at": "2023-11-07T05:31:56Z",
"read_at": "2023-11-07T05:31:56Z",
"failed_at": "2023-11-07T05:31:56Z"
}
headers = {
"x-account-id": "<x-account-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-account-id': '<x-account-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
parent_message_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
external_message_id: '<string>',
sender_user_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
sender_customer_id: '<string>',
sender_email: 'jsmith@example.com',
sender_display_name: '<string>',
recipient_actor_ids: [{}],
subject: '<string>',
body_text: '<string>',
body_html: '<string>',
attachments: [{}],
raw_payload: {},
sent_at: '2023-11-07T05:31:56Z',
delivered_at: '2023-11-07T05:31:56Z',
read_at: '2023-11-07T05:31:56Z',
failed_at: '2023-11-07T05:31:56Z'
})
};
fetch('https://app.masivo.ai/api/storefront/v1/communication/threads/{id}/messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.masivo.ai/api/storefront/v1/communication/threads/{id}/messages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'parent_message_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'external_message_id' => '<string>',
'sender_user_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'sender_customer_id' => '<string>',
'sender_email' => 'jsmith@example.com',
'sender_display_name' => '<string>',
'recipient_actor_ids' => [
[
]
],
'subject' => '<string>',
'body_text' => '<string>',
'body_html' => '<string>',
'attachments' => [
[
]
],
'raw_payload' => [
],
'sent_at' => '2023-11-07T05:31:56Z',
'delivered_at' => '2023-11-07T05:31:56Z',
'read_at' => '2023-11-07T05:31:56Z',
'failed_at' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-account-id: <x-account-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.masivo.ai/api/storefront/v1/communication/threads/{id}/messages"
payload := strings.NewReader("{\n \"parent_message_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"external_message_id\": \"<string>\",\n \"sender_user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sender_customer_id\": \"<string>\",\n \"sender_email\": \"jsmith@example.com\",\n \"sender_display_name\": \"<string>\",\n \"recipient_actor_ids\": [\n {}\n ],\n \"subject\": \"<string>\",\n \"body_text\": \"<string>\",\n \"body_html\": \"<string>\",\n \"attachments\": [\n {}\n ],\n \"raw_payload\": {},\n \"sent_at\": \"2023-11-07T05:31:56Z\",\n \"delivered_at\": \"2023-11-07T05:31:56Z\",\n \"read_at\": \"2023-11-07T05:31:56Z\",\n \"failed_at\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-account-id", "<x-account-id>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.masivo.ai/api/storefront/v1/communication/threads/{id}/messages")
.header("x-account-id", "<x-account-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"parent_message_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"external_message_id\": \"<string>\",\n \"sender_user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sender_customer_id\": \"<string>\",\n \"sender_email\": \"jsmith@example.com\",\n \"sender_display_name\": \"<string>\",\n \"recipient_actor_ids\": [\n {}\n ],\n \"subject\": \"<string>\",\n \"body_text\": \"<string>\",\n \"body_html\": \"<string>\",\n \"attachments\": [\n {}\n ],\n \"raw_payload\": {},\n \"sent_at\": \"2023-11-07T05:31:56Z\",\n \"delivered_at\": \"2023-11-07T05:31:56Z\",\n \"read_at\": \"2023-11-07T05:31:56Z\",\n \"failed_at\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.masivo.ai/api/storefront/v1/communication/threads/{id}/messages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-account-id"] = '<x-account-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"parent_message_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"external_message_id\": \"<string>\",\n \"sender_user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sender_customer_id\": \"<string>\",\n \"sender_email\": \"jsmith@example.com\",\n \"sender_display_name\": \"<string>\",\n \"recipient_actor_ids\": [\n {}\n ],\n \"subject\": \"<string>\",\n \"body_text\": \"<string>\",\n \"body_html\": \"<string>\",\n \"attachments\": [\n {}\n ],\n \"raw_payload\": {},\n \"sent_at\": \"2023-11-07T05:31:56Z\",\n \"delivered_at\": \"2023-11-07T05:31:56Z\",\n \"read_at\": \"2023-11-07T05:31:56Z\",\n \"failed_at\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"thread_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"parent_message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_message_id": "<string>",
"sender_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sender_customer_id": "<string>",
"sender_email": "jsmith@example.com",
"sender_display_name": "<string>",
"recipient_actor_ids": [
{}
],
"subject": "<string>",
"body_text": "<string>",
"body_html": "<string>",
"attachments": [
{}
],
"raw_payload": {},
"sent_at": "2023-11-07T05:31:56Z",
"delivered_at": "2023-11-07T05:31:56Z",
"read_at": "2023-11-07T05:31:56Z",
"failed_at": "2023-11-07T05:31:56Z",
"status": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"details": "<string>"
}{
"error": "<string>",
"details": "<string>"
}Tickets
Create communication message
Create a message, reply, internal note, system event, or review event inside a communication thread. Use parent_message_id for a reply to a specific message.
POST
/
communication
/
threads
/
{id}
/
messages
cURL
curl --request POST \
--url https://app.masivo.ai/api/storefront/v1/communication/threads/{id}/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-account-id: <x-account-id>' \
--data '
{
"parent_message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_message_id": "<string>",
"sender_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sender_customer_id": "<string>",
"sender_email": "jsmith@example.com",
"sender_display_name": "<string>",
"recipient_actor_ids": [
{}
],
"subject": "<string>",
"body_text": "<string>",
"body_html": "<string>",
"attachments": [
{}
],
"raw_payload": {},
"sent_at": "2023-11-07T05:31:56Z",
"delivered_at": "2023-11-07T05:31:56Z",
"read_at": "2023-11-07T05:31:56Z",
"failed_at": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://app.masivo.ai/api/storefront/v1/communication/threads/{id}/messages"
payload = {
"parent_message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_message_id": "<string>",
"sender_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sender_customer_id": "<string>",
"sender_email": "jsmith@example.com",
"sender_display_name": "<string>",
"recipient_actor_ids": [{}],
"subject": "<string>",
"body_text": "<string>",
"body_html": "<string>",
"attachments": [{}],
"raw_payload": {},
"sent_at": "2023-11-07T05:31:56Z",
"delivered_at": "2023-11-07T05:31:56Z",
"read_at": "2023-11-07T05:31:56Z",
"failed_at": "2023-11-07T05:31:56Z"
}
headers = {
"x-account-id": "<x-account-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-account-id': '<x-account-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
parent_message_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
external_message_id: '<string>',
sender_user_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
sender_customer_id: '<string>',
sender_email: 'jsmith@example.com',
sender_display_name: '<string>',
recipient_actor_ids: [{}],
subject: '<string>',
body_text: '<string>',
body_html: '<string>',
attachments: [{}],
raw_payload: {},
sent_at: '2023-11-07T05:31:56Z',
delivered_at: '2023-11-07T05:31:56Z',
read_at: '2023-11-07T05:31:56Z',
failed_at: '2023-11-07T05:31:56Z'
})
};
fetch('https://app.masivo.ai/api/storefront/v1/communication/threads/{id}/messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.masivo.ai/api/storefront/v1/communication/threads/{id}/messages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'parent_message_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'external_message_id' => '<string>',
'sender_user_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'sender_customer_id' => '<string>',
'sender_email' => 'jsmith@example.com',
'sender_display_name' => '<string>',
'recipient_actor_ids' => [
[
]
],
'subject' => '<string>',
'body_text' => '<string>',
'body_html' => '<string>',
'attachments' => [
[
]
],
'raw_payload' => [
],
'sent_at' => '2023-11-07T05:31:56Z',
'delivered_at' => '2023-11-07T05:31:56Z',
'read_at' => '2023-11-07T05:31:56Z',
'failed_at' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-account-id: <x-account-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.masivo.ai/api/storefront/v1/communication/threads/{id}/messages"
payload := strings.NewReader("{\n \"parent_message_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"external_message_id\": \"<string>\",\n \"sender_user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sender_customer_id\": \"<string>\",\n \"sender_email\": \"jsmith@example.com\",\n \"sender_display_name\": \"<string>\",\n \"recipient_actor_ids\": [\n {}\n ],\n \"subject\": \"<string>\",\n \"body_text\": \"<string>\",\n \"body_html\": \"<string>\",\n \"attachments\": [\n {}\n ],\n \"raw_payload\": {},\n \"sent_at\": \"2023-11-07T05:31:56Z\",\n \"delivered_at\": \"2023-11-07T05:31:56Z\",\n \"read_at\": \"2023-11-07T05:31:56Z\",\n \"failed_at\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-account-id", "<x-account-id>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.masivo.ai/api/storefront/v1/communication/threads/{id}/messages")
.header("x-account-id", "<x-account-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"parent_message_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"external_message_id\": \"<string>\",\n \"sender_user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sender_customer_id\": \"<string>\",\n \"sender_email\": \"jsmith@example.com\",\n \"sender_display_name\": \"<string>\",\n \"recipient_actor_ids\": [\n {}\n ],\n \"subject\": \"<string>\",\n \"body_text\": \"<string>\",\n \"body_html\": \"<string>\",\n \"attachments\": [\n {}\n ],\n \"raw_payload\": {},\n \"sent_at\": \"2023-11-07T05:31:56Z\",\n \"delivered_at\": \"2023-11-07T05:31:56Z\",\n \"read_at\": \"2023-11-07T05:31:56Z\",\n \"failed_at\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.masivo.ai/api/storefront/v1/communication/threads/{id}/messages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-account-id"] = '<x-account-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"parent_message_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"external_message_id\": \"<string>\",\n \"sender_user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sender_customer_id\": \"<string>\",\n \"sender_email\": \"jsmith@example.com\",\n \"sender_display_name\": \"<string>\",\n \"recipient_actor_ids\": [\n {}\n ],\n \"subject\": \"<string>\",\n \"body_text\": \"<string>\",\n \"body_html\": \"<string>\",\n \"attachments\": [\n {}\n ],\n \"raw_payload\": {},\n \"sent_at\": \"2023-11-07T05:31:56Z\",\n \"delivered_at\": \"2023-11-07T05:31:56Z\",\n \"read_at\": \"2023-11-07T05:31:56Z\",\n \"failed_at\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"thread_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"parent_message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_message_id": "<string>",
"sender_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sender_customer_id": "<string>",
"sender_email": "jsmith@example.com",
"sender_display_name": "<string>",
"recipient_actor_ids": [
{}
],
"subject": "<string>",
"body_text": "<string>",
"body_html": "<string>",
"attachments": [
{}
],
"raw_payload": {},
"sent_at": "2023-11-07T05:31:56Z",
"delivered_at": "2023-11-07T05:31:56Z",
"read_at": "2023-11-07T05:31:56Z",
"failed_at": "2023-11-07T05:31:56Z",
"status": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"details": "<string>"
}{
"error": "<string>",
"details": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
The account that owns the communication thread
Path Parameters
The communication thread id
Body
application/json
Available options:
inbound, outbound, internal, system Available options:
message, reply, internal_note, system_event, review_event Available options:
email, whatsapp, chat, review, system, other Available options:
customer, agent, system, integration, email, unknown Available options:
queued, sent, delivered, read, failed, received Response
Communication message created
Show child attributes
Show child attributes
⌘I